home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / amiga / asrc29k.lha / mailbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-08  |  3.8 KB  |  93 lines

  1. /* Defines for the ax.25 mailbox facility */
  2.  
  3. #define NUMMBX        10        /* max number of mailbox sessions */
  4.  
  5. #define MAXPWDLEN    80
  6.  
  7. #define MBXLINE        128        /* max length of line */
  8. struct mbx {
  9.     int state ;            /* mailbox state */
  10. #define MBX_LOGIN    0        /* trying to log in */
  11. #define MBX_CMD        1        /* in command mode */
  12. #define MBX_SUBJ    2        /* waiting for a subject line */
  13. #define MBX_DATA    3        /* collecting the message */
  14. #define MBX_REVFWD    4        /* reverse forwarding in progress */
  15. #define MBX_TRYING    5        /* pending forwarding connection */
  16. #define MBX_FORWARD    6        /* established forwarding connection */
  17. #define MBX_CHATNODE    7        /* chatnode */
  18. #define MBX_GATEWAY    8        /* gatewaying somewhere */
  19. #define MBX_READ    9        /* reading a message */
  20. #define MBX_UPLOAD    10        /* uploading a file */
  21. #define MBX_DOWNLOAD    11        /* downloading a file */
  22. #define MBX_PAGESYSOP    12        /* Chatting with sysop */
  23. #define MBX_WHAT    13        /* Listing files */
  24. #define MBX_SYSOPTRY    14        /* Trying sysop */
  25. #define MBX_SYSOP    15        /* Is sysop */
  26.     int family ;            /* Type of connection */
  27.     char name[20] ;            /* Name of remote station */
  28.     char *to ;            /* To-address in form user or user@host */
  29.     char *origto ;            /* Original To-address, if rewritten */
  30.     char *tofrom ;            /* Optional <from in to-address */
  31.     char *tomsgid ;            /* Optional $msgid in to-address */
  32.     FILE *tfile ;            /* Temporary file for message */
  33.     char line[MBXLINE+1] ;    /* Room for null at end */
  34.     int mbnum ;        /* which mailbox session is this? */
  35.     int sid ;        /* Characteristics indicated by the SID */
  36.                 /* banner of the attaching station.  If */
  37.                 /* no SID was sent, this is zero.  If an */
  38.                 /* SID of any kind was received, it is */
  39.                 /* assumed that the station supports */
  40.                 /* abbreviated mail forwarding mode. */
  41. #define    MBX_SID        0x01    /* Got any SID */
  42. #define    MBX_RLI_SID    0x02    /* This is an RLI BBS, disconnect after F> */
  43. #define MBX_HIER_SID    0x04    /* The BBS supports "hierarchical routing */
  44. #define MBX_MID_SID    0x08    /* The BBS supports "message-id" */
  45.                 /* Space here for others, currently not of */
  46.                 /* interest to us. */
  47.     char stype ;        /* BBS send command type (B,P,T, etc.) */
  48.     int type ;        /* Type of session when invoking "chat" */
  49.     int user;        /* User linkage area */
  50.     char escape;        /* Escape character */
  51.     int privs;        /* Privileges */
  52. #define AX25_CMD    8    /* AX.25 gateway operation allowed */
  53. #define TELNET_CMD    16    /* Telnet gateway operation allowed */
  54. #define NETROM_CMD    32    /* NET/ROM gateway operation allowed */
  55. #define SYSOP_CMD    64    /* Remote sysop access allowed */
  56. #define EXCLUDED_CMD    128    /* This user is banned from the BBS */
  57.     char *path;        /* Directory path */
  58.     char *startmsg;        /* Message to be sent at connect through any
  59.                 /* of the gateways */
  60.     int current;        /* the current message number */
  61.     int nmsgs;        /* number of messages in this mail box */
  62.     int newmsgs;        /* number of new messages in mail box */
  63.     int change;        /* mail file changed */
  64.     int anyread;        /* true if any message has been read */
  65.     FILE *mfile;        /* mail data file pointer */
  66.     char area[64];        /* name of current mail area */
  67.     long mboxsize;        /* size of mailbox when opened */
  68.     long mysize;        /* size of my private mailbox */
  69.     struct let *mbox;
  70. } ;
  71. #define     NULLMBX        (struct mbx *)0
  72.  
  73. extern struct mbx *Mbox[NUMMBX] ;
  74. extern int ax25mbox ;
  75. extern char Noperm[];
  76. extern int ThirdParty;
  77.  
  78. /* In mailbox.c: */
  79. void mbx_incom __ARGS((int s,void *t,void *p));
  80. int domboxdisplay __ARGS((int argc,char *argv[],void *p));
  81. struct mbx *newmbx __ARGS((void));
  82. void exitbbs __ARGS((struct mbx *m));
  83. int domboxbye __ARGS((int argc,char *argv[],void *p));
  84. int mbx_parse __ARGS((struct mbx *m));
  85. void changearea __ARGS((struct mbx *m,char *area));
  86. char *rewrite_address __ARGS((char *addr));
  87.  
  88. /* In forward.c: */
  89. int dorevfwd __ARGS((int argc,char *argv[],void *p));
  90. int dombtimer __ARGS((int argc,char *argv[],void *p));
  91. int dombkick __ARGS((int argc,char *argv[],void *p));
  92.  
  93.